#pragma once
#include "../Utilities/utilities.h"

#define TRANSLATE_STEP 2.0f
#define ROTATE_STEP 0.05f
#define SCALE_STEP 0.1f
class Camera
{
private:
	Vector3 displace, rotate;
	Matrix translationMatrix;
	Matrix rotationMatrix;
	Matrix worldMatrix;
	Matrix projectionMatrix;
	Matrix viewMatrix;

	Vector3 up, xaxis, yaxis, zaxis, position, target_local;
	// Camera transform: T S R

	void calcAxis(Vector3& position, Vector3& target);
	void calcMatrix();
public:
	void setFOV(Vector3& position, Vector3& up, Vector3& target, GLfloat fovy, GLfloat aspect, GLfloat nearPlane, GLfloat farPlane);
	Matrix getViewMatrix();
	Matrix& getProjectionMatrix();
	Vector3 getPosition();
	Vector3 getTarget();
	void moveLeft();
	void moveRight();
	void moveForward();
	void moveBackward();
	void RotateLeft();
	void RotateRight();
	void RotateUp();
	void RotateDown();
	~Camera(void);
	Camera(void);
};
